<template>
	<gui-page>
		<template v-slot:gBody>
			<view class="gui-dark-bg-level-3">
				<!-- 文章标题 -->
				<view class="gui-padding">
					<text class="gui-h4 gui-bold">{{ info.title }}</text>
				</view>
				<!-- 文章内容 -->
				<view class="gui-padding">
					<rich-text :nodes="info.content"></rich-text>
				</view>
			</view>
		</template>
	</gui-page>
</template>

<script setup>
import { onLoad } from '@dcloudio/uni-app';
import { ref } from 'vue';
import { articleApi } from '@api/test.js';

let info = ref({});
onLoad((query) => {
	articleApi({ id: query.code }).then((res) => {
		info.value = res.data;
	});
});
</script>

<style></style>
